package com.information.manage.MaintenanceRecord.service.impl;

import com.information.manage.MaintenanceRecord.mapper.FenxiangMapper;
import com.information.manage.MaintenanceRecord.pojo.Fenxiang;
import com.information.manage.MaintenanceRecord.service.FenxiangService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FenxiangServicelmpl implements FenxiangService {
    @Autowired
    private FenxiangMapper fenxiangMapper;

    @Override
    public List<Fenxiang> selectAll() {
        return fenxiangMapper.selectAll();
    }

    @Override
    public void addMaintFenxiang(Fenxiang fenxiang) {
        fenxiangMapper.insert(fenxiang);
    }

    @Override
    public void updateMaintFenxiang(Fenxiang fenxiang) {
        fenxiangMapper.update(fenxiang);
    }

    @Override
    public void deleteMaintFenxiang(Integer recordid) {
        fenxiangMapper.delete(recordid);
    }

    @Override
    public void logicDeleteMaintFenxiang(Integer recordid) {
        fenxiangMapper.logicDelete(recordid);
    }

    @Override
    public List<Fenxiang> selectAllWithSearch(String searchKeyword) {
        return fenxiangMapper.selectAllWithSearch(searchKeyword);
    }
}